package org.netEase.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.netEase.dao.userDao;
import org.netEase.dao.impl.userDaoImpl;
import org.netEase.entity.user;

import com.alibaba.fastjson.JSON;
@WebServlet(urlPatterns= {"/frontDeskManager/zhanghuInfo.shtml"})
public class frontDeskOrderIndexphono extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		String hid=request.getParameter("hid");
		userDao userDao = new userDaoImpl();
		if (hid != null && hid != "") {
			user user = userDao.getbyhid(Integer.parseInt(hid));
			response.setContentType("application/json;charset=utf-8");
			String users = JSON.toJSONString(user);
			response.getWriter().print(users);
		}
		
		
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		this.doGet(request, response);
	}
}
